package com.wm.user.service;

import com.wm.user.dao.StudentMapper;
import com.wm.user.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by asus on 2017/7/6.
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Transactional
    @Override
    public int createStudent(Student student) {

        studentMapper.insertStudentSelective(student);

//        Student stu = new Student();
//        stu.setStuId("006");
//        stu.setStuName("hahah");
//
//        studentMapper.insertStudentSelective(stu);

        return 0;
    }
}
